<?php

/*
 * This will be the Organization Setup page. 
 * This page involves :
 * Department Setup
 * Position Setup
 * Department Position Setup
 * 
 * Created by: Peter Agno Jr.
 * Date created: November 28, 2011
 */

    include("siteTop.php"); 
    include('includes/siteConfig.php'); 

    // connect to database
    $connect = mysql_connect($hostName,$rootName,$dBasePassword) or die ('Unable to connect!');
    mysql_select_db($dBaseName) or die ('Unable to select database!');
?>

<!-- HEADER START -->
    <!--JAVASCRIPT SOURCES-->
    <script src="js/jquery-1.6.2.min.js"></script>
    
    <!--ACTUAL JS SCRIPTS AND JQUERIES-->
    <script type="text/javascript">
        jQuery(document).ready(function(){ 
            // CHANGE FIRST THE CSS OF THE NAV BAR
            jQuery("#adminTools-nav").addClass("highlightMenuBar");
            jQuery("#orgSetup-nav").addClass("highlightMenuBar");
            
            // Start - Go to admDepartmentSetup.php
            jQuery('#admDeptStpBtn').live("click",function() {
                window.location = 'admDepartmentSetup.php';
            }); // End - Go to admPositionSetup.php
            
            // Start - Go to admPositionSetup.php
            jQuery('#admPosStpBtn').live("click",function() {
                window.location = 'admPositionSetup.php';
            }); // End - Go to admPositionSetup.php
            
            // Start - Go to admDeptPosSetup.php
            jQuery('#admDeptPosStpBtn').live("click",function() {
                window.location = 'admDeptPosSetup.php';
            }); // End - Go to admDeptPosSetup.php
        });
    </script>
<!-- HEAD END -->

<?php include("siteMiddle.php"); ?>

<div id="content">
<h1>Organization Setup</h1>
    <div class="contentbox">
        <?php
        // Check permission
        $thePermissions = array('DEPTSTP', 'POSSTP');
        if ( checkPermission( $thePermissions, $userId ) == true ) {
        ?>
            <input type="Submit" name="admDeptStpBtn" id="admDeptStpBtn" value="Department" class="siteGreenButton" />
            <br/><br/>
<!--            <input type="Submit" name="admPosStpBtn" id="admPosStpBtn" value="Position (Delete)" class="siteGreenButton" />
            <br/><br/>-->
            <input type="Submit" name="admDeptPosStpBtn" id="admDeptPosStpBtn" value="Position" class="siteGreenButton" />
        <?php
        }
        else {
            echo "<div class='noPermissionMsgBox noPermissionMsg' style='border: 2px solid red'><div id='noPermissionMsgs'>You have no permission to view this page.</div></div>";
        }
        // End checking permission
        ?>
    </div> <!-- contentbox end div -->
    <div style="position:relative; visibility: hidden">end</div>    <!-- extra space for contentbox -->
</div> <!-- content end div -->

<?php
    include ("siteBottom.php"); 
?>

